package 测试POI;

import io.netty.util.internal.ResourcesUtil;
import org.junit.Test;
import org.springframework.util.ResourceUtils;

import java.io.File;
import java.io.FileNotFoundException;

/**
 * @author 江南大学1033190417
 * @date 2022/1/22 15:15
 */
public class test {
    @Test
    public void getPath(){
        String url="";
        try {
            url=ResourceUtils.getURL("classpath:").toString()+"static/temporary/picture/";
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        File file=new File(url+"abc.text");
        System.out.println(file.getPath());
        System.out.println(url);
        //System.out.println(System.getProperty("user.dir"));
    }
}
